//
//  TransitionAnimator.h
//  MyFunctionDemo
//
//  Created by Ting Han on 2017/9/1.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class TransitionAnimator;
/**
 转场动画
 */
@protocol TransitionAnimatorDelegate <NSObject>

@optional
//转场动画结束后的回调
- (void)transitionAnimationEnded:(TransitionAnimator *)animator;

@end

@interface TransitionAnimator : NSObject<UIViewControllerAnimatedTransitioning>

@property (nonatomic, weak) id <TransitionAnimatorDelegate>  delegate;
@property (nonatomic) NSTimeInterval  transitionDuration;
//结束转场动画
- (void)completeTransition;

#pragma mark - Overwrite by subClass.

//子类重写转场动画
- (void)transitionAnimation;

#pragma mark - 自定义动画时，可以使用的属性
@property (nonatomic, readonly, weak) UIViewController *fromViewController;

@property (nonatomic, readonly, weak) UIViewController *toViewController;

@property (nonatomic, readonly, weak) UIView           *containerView;


@end
